<template>
	<view class="item" :id="index % 2 == 0 ? 'margin14' : ''">
		<image :src="$util.getAvatar(item.goods_image)" mode="aspectFill"></image>
		<view class="name flex_center">
			<view class="left hidden">{{ item.name || '' }}</view>
		</view>
		<view class="price flex_r_between">
			<text class="left"><i>￥</i>{{ item.price || '0.00' }}</text>
			<view class="right flex_r_around">
				<text>下单</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'product',
		props: {
			item: {
				type: Object,
				default: () => {},
			},
			index: {
				type: Number,
				default: 0,
			},
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="less" scoped>
	.item {
		width: 352rpx;
		height: 480rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		margin-bottom: 14rpx;
		overflow: hidden;
		image {
			width: 352rpx;
			height: 352rpx;
			display: block;
		}
		
		.name {
			padding: 12rpx 24rpx;
			.left {
				flex: 1;
				font-size: 28rpx;
				color: #131313;
			}
			
			
		}
		
		.price {
			padding: 0 24rpx;
			.left {
				font-weight: 600;
				font-size: 36rpx;
				color: #FD2A53;
				i {
					font-weight: 600;
					color: #FD2A53;
					font-style: normal;
					font-size: 24rpx;
				}
			}
			
			.right {
				width: 80rpx;
				height: 36rpx;
				background: #FD2A53;
				border-radius: 16rpx;
			
				text {
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}
		}
		
	}
	
	#margin14 {
		margin-right: 14rpx;
	}
</style>
